Adds QAT ConvBN fuse pass to utils#17599
Open
JakeStevens wants to merge 3 commits intopytorch:mainfrom
Open
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17599
Note: Links to docs will display an error until the docs builds have been completed. ❌ 11 New FailuresAs of commit b42fe75 with merge base 746db5f ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
|
@JakeStevens has exported this pull request. If you are a Meta employee, you can view the originating Diff in D93904683. |
Summary: Make the NXP test_batch_norm_fusion tests compatible with the BUCK build system. The tflite import in executors.py is made optional since tensorflow/tflite_runtime are not available in the BUCK environment. The tests enabled do not rely on the functionality enabled by tflite. Differential Revision: D93880277
Summary: When performing QAT with a conv layer (bias=False) followed by batch norm, the fusion process introduces a bias after observers are attached, so the bias remains unquantized. This PR introduces a new pass to find such biases, compute the correct scale from the input and weight dequantize nodes, and insert proper quantize/dequantize nodes for the bias. It operates on aten dialect graphs, supporting both plain GraphModules (get_attr nodes) and ExportedPrograms (placeholder nodes) Differential Revision: D92733079
Summary: Earlier PR adds support for a pass that quantizes the bias resulting from QAT ConvBN fusion without an initial bias. This PR adds it to the NXP calibrate_and_quantize method. Differential Revision: D93904683
4eb68eb to
b42fe75
Compare
larryliu0820
approved these changes
Feb 24, 2026
Contributor
larryliu0820
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Earlier PR adds support for a pass that quantizes the bias resulting from QAT ConvBN fusion without an initial bias.
This PR adds it to the NXP calibrate_and_quantize method.
Differential Revision: D93904683
cc @robert-kalmar @digantdesai